<!DOCTYPE html>

<html lang="zh-cn">

{include file="public/head" /}

<link href="/static/member/global-min.css" type="text/css" rel="stylesheet">

<link href="/static/member/account-settings.css" type="text/css" rel="stylesheet">

<body>

<!--头部-->

{include file="public/header" /}



<style type="text/css">

    #wrap {

        margin: 100px auto;

        width: 400px;

    }

</style>

<div id="wrap">

    <div class="login-entry">

        <div class="head">

            <h2 style="color: #2e353b;">登录大观网</h2>

            <b class="line"></b></div>

        <div class="login-error" style="font-size: 13px;width: 300px;letter-spacing: 1px;">

            <table>

                <tr>

                    <td id="tip"></td>

                </tr>

            </table>

        </div>

        <ul class="login-items">

            <li>

                <label>用户名</label>

                <input type="text" id="username" name="username" class="input" maxlength="11" placeholder="手机号">

            </li>

            <li>

                <label>密码</label>

                <input style="background-color: transparent;position: relative;z-index: 2;" type="password"

                       name="password" id="password" class="input" maxlength="16" placeholder="请输入6-16位登录密码">

            </li>



        </ul>

        <div class="login-check">

            <input type="checkbox" id="checkWeekly">

            <label for="checkWeekly">记住我<a href="javascript:;" class="icons yhelp ToolTips ToolTipCol"

                                           data-text="一周内自动登录，公共场合慎用">帮助</a></label>

        </div>

        <div class="login-button">

            <input id="btn" name="登录" type="button" value="登录">

        </div>

        <div class="login-server">

            <a href="{:url('Member/re_user')}" style="padding-left: 0;">忘记密码</a>

            <a href="{:url('Member/registe')}" class="reg">免费注册</a>

        </div>

        <div class="login-server" style="color: #8a949c;font-size: 13px;padding-top: 0;">

            <!--其他方式:-->

            <!-- <a href="/gotoweibo.action" class="weibo" style="color:#8a949c;margin-right: 6px;padding-left: 25px;margin-left: 4px;">

                <i class="icons" style="top: 0;"></i>微博登录</a>

            |     -->



            <!--  百度统计  登录页-“微信登录”按钮点击 -->

            <!--<a data-hm="login_page, wechat_login" href="#" class="wechat" style="color:#8a949c;"><i class="icons"></i>微信登录</a>-->

        </div>

        <div class="security-pro"><i class="icons ver-green-down"></i><b>您的信息已通过256位SGC加密保护，数据传输安全</b></div>

    </div>

</div>



<script src="/static/admin/js/jquery.min.js?v=2.1.4"></script>



<script src="/static/admin/js/jquery.form.js"></script>

<script src="/static/admin/js/layer/layer.js"></script>

<script>

    $('#btn').click(function () {

        var username = $('#username').val();
        var password = $('#password').val();
        var obj = new Object();
        if (password == '') {
            layer.msg('密码不能为空', {icon: 5});
            return false;
        }
        obj['username'] = username;
        if (username == '') {
            layer.msg('账号/手机号 不能为空', {icon: 5});
            return false;
        }
        obj['password'] = password;
        if($('#checkWeekly').prop('checked')){
            obj['remember'] = 1;
        }else{
            obj['remember'] = 0;
        }


        $.ajax({

            url: "{:url('member/login')}",

            type: 'post',

            dataType: 'json',

            data: obj,

            success: function (res) {

                if (res.code == 1) {

                    //layer.msg('登录成功',{icon:6});

                    window.location.href = res.url;

                } else if (res.code == -1) {

                    alert(res.msg)

                } else {

                    alert(res.msg)

                }

            }

        });



    });

</script>



{include file="public/footer" /}

{include file="public/foot" /}

</body>





</html>